package org.example.design.One;

/**
 * @Auther:Liu
 * @Testname:DemoD
 * @Date:2025/8/15 9:52
 */
//双重校验
public class DemoD {
    private static volatile DemoD instance;

    private DemoD() {
    }

    public static DemoD getInstance() {
        if (instance == null) {
            synchronized (DemoD.class) {
                if (instance == null) {
                    instance = new DemoD();
                }
            }
        }
        return instance;
    }
}
